package com.qili.service.base;

import com.qili.base.service.BaseService;
import com.qili.entity.supervisor.SupervisorProjectMilepost;
import com.qili.entity.supervisor.SupervisorProjectStage;
import com.qili.entity.supervisor.dto.SupervisorProjectMilepostDTO;

import java.util.List;

/**
 * @author zhaoyongke
 * @date 2020/11/3
 * @description
 */
public interface SupervisorProjectMilepostService extends BaseService<SupervisorProjectMilepost,String> {

    List<SupervisorProjectMilepostDTO> selectProjectmilepost(SupervisorProjectMilepostDTO dto);

    //int insert(SupervisorProjectMilepost supervisorProjectMilepost);

    /**
     * 获取已完成(finishStatus为"2")的,或者为参数当前的里程列表
     *
     * @param milepost 里程完成时的当前里程
     * @return 符合条件的里程列表
     */
    List<SupervisorProjectMilepost> getFinishedMilepost(SupervisorProjectMilepost milepost);
    /**
     * @Author:Zhangshuo
     * @Description:根据项目ID删除
     * @param ids
     * @Date:20:44 2020-12-11
     */
    int deleteByProjectIds(String[] ids);

    /**
     * 获取阶段已经完成的里程碑的占比和
     * @param stage
     */
    String getFinishedMilepostProgress(SupervisorProjectStage stage);

    String getFinishedMilepostProgress(SupervisorProjectMilepost milepost);

    /**
     * @Author:zhaoyongke
     * @Description:查询阶段中里程 根据排序号
     * @param supervisorProjectMilepostDTO
     * @Date:14:44 2021/1/23
     */
    List<SupervisorProjectMilepostDTO> selectMilePostOrder(SupervisorProjectMilepostDTO  supervisorProjectMilepostDTO);
}